//写入文件
function write(path, str) {
  fs.writeFileSync(path, str);
}

//拷贝文件
function copyTemplate(from, to) {
  from = path.join(__dirname, from);
  write(to, fs.readFileSync(from, 'utf-8'));
}


//项目路径
function getDestDir(dirName) {
  return process.cwd() + '/' + dirName;
}

module.exports = {
  write,copyTemplate,getDestDir
}